#ifndef __HW_API_H__
#define __HW_API_H__

#include "reg-gpio.h"
#include "reg-others.h"

/*
 * @file :delay.c
 */
extern void mdelay(u32_t ms);

/*
 * @file :led.c
 */
enum __LED
{
    LED1_GPJ0_3 = 0,
    LED2_GPJ0_4 = 1,
    LED3_GPJ0_5 = 2,
    LED4_GPD0_1 = 3,
};
extern void led_init(void);
extern void led_set(int id, int on);
extern void led_all_on(void);
extern void led_all_off(void);
extern void led_lightWater(void);

/*
 * @file: buzzer.c
 */
extern void speaker_init(void);
extern void speaker_set(int on);

/*
 * @file: key.c
 */
extern void key_init(void);
extern u8_t leftKey_IsPressed(void);
extern u8_t downKey_IsPressed(void);
extern u8_t upKey_IsPressed(void);
extern u8_t rightKey_IsPressed(void);
extern u8_t backKey_IsPressed(void);
extern u8_t menuKey_IsPressed(void);
extern void key_polling(void);

#endif  /* __HW_API_H__ */
